<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Select Language</title>
</head>
<body>
<div th:fragment="languages">
<form action="" method="post">
    <label for="languagePreference">Language Preference:</label>
    <select name="languagePreference" id="languagePreference">
        <option th:each="language : ${languages}"
                th:value="${language.code}"
                th:text="${language.name}">
        </option>
    </select>
</form>
</div>
</body>
</html>